package com.android.vmg;

import java.util.List;

import android.app.Activity;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

public class Ranking extends Activity {
	
	@Override
	public void onCreate(Bundle savedState) {
		super.onCreate(savedState);
		setContentView(R.layout.ranking);
		TextView list = (TextView)findViewById(R.id.textView1);
		AppPreferences appPrefs = new AppPreferences(getApplicationContext());
		List<Integer> ranking = appPrefs.getRanking();
		String txt = "Ranking:\n";
		for(Integer val : ranking) {
			txt = txt + val.toString() + "\n";
		}
		list.setText(txt);
	}
	
	public void back(View v) {
		Intent intent = new Intent();
		setResult(RESULT_OK, intent);
		finish();
	}
	
}
